import http from '@/utils/http'
export interface LoginData {
    username: string;
    password: string;
    key?:string,
    captcha?:string;
}

/** @desc 获取验证码 */
export function getCaptcha(){
    return http.get('/admin/login/captcha');
}

/** @desc 登录 */
export function login(data: LoginData) {
    return http.post('/admin/login/login', data);
}
/** @desc 登出 */
export function logout() {
    return http.post('/admin/login/logout');
}
